{include file="public/headerbase" /} {include file="public/left" /}
<div class="right-content">
	<ol class="breadcrumb we7-breadcrumb">
		<li>
			<a href="{:url('Brand/index')}">品牌介绍</a>
		</li>
		<li>
			编辑信息
		</li>
	</ol>
	<div class="clearfix">
		{foreach name="data" item="val"}
		<div class="we7-form">
			<div class="form-group">
				<label class="col-sm-2 control-label">品牌名称</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="bname" id="bname" value="{$val['bname']}" placeholder="品牌名称" />
				</div>
			</div>
			<div class="form-group">
				<div class="">
					<input type="hidden" name="bid" value="{$val['bid']}" />
					<input type="submit" class="btn btn-primary" value="提交" onclick="tijiao({$val['bid']})" />
					<a href="{:url('Brand/index')}"><button type="button" class="btn btn-success">取消</button></a>
				</div>
			</div>
		</div>
		{/foreach}
	</div>
	<script>
	function tijiao(bid){
		var bname=$('#bname').val();
		$.ajax({
	        url: "{:url('Brand/xiugai')}",
	        data:{"bname":bname,"bid":bid},
	        type: "post",
	        dataType: "json",
	        success: function (mega) {
	          if(mega==1){
	           		util.message('修改品牌成功', "{:url('Brand/index')}", 'info');
	           }else{
	           		util.message('修改品牌失败', '', '');
	           }
	        }
    	});
	}
	</script>
</div>
</div>
</div>
</div>
</div>
{include file="public/footer" /}